package com.inst.jsoup_html_demo.utils;

import android.graphics.Canvas;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.State;
import android.support.v7.widget.RecyclerView.LayoutParams;
import android.view.View;

/**
 * Created by Administrator on 2018/1/23 0023.
 */

public class ItemDecoration {

    public void onDraw(Canvas c, RecyclerView parent, State state) {
//        onDraw(c, parent);
    }


    public void onDrawOver(Canvas c, RecyclerView parent, State state) {
//        onDrawOver(c, parent);
    }

    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, State state) {
        getItemOffsets(outRect, ((LayoutParams) view.getLayoutParams()).getViewLayoutPosition(),
                parent);
    }

    @Deprecated
    public void getItemOffsets(Rect outRect, int itemPosition, RecyclerView parent) {
        outRect.set(0, 0, 0, 0);
    }
}
